package com.ruoyi.base.service.impl;

import java.util.List;
import java.util.Map;
import java.util.UUID;

import com.ruoyi.base.domain.BusWaterIndustry;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.base.mapper.BasPollutionsourceMapper;
import com.ruoyi.base.domain.BasPollutionsource;
import com.ruoyi.base.service.IBasPollutionsourceService;

/**
 * 工业污染源Service业务层处理
 * 
 * @author maliang
 * @date 2025-08-17
 */
@Service
public class BasPollutionsourceServiceImpl implements IBasPollutionsourceService 
{
    @Autowired
    private BasPollutionsourceMapper basPollutionsourceMapper;

    /**
     * 查询工业污染源
     * 
     * @param id 工业污染源主键
     * @return 工业污染源
     */
    @Override
    public BasPollutionsource selectBasPollutionsourceById(String id)
    {
        return basPollutionsourceMapper.selectBasPollutionsourceById(id);
    }

    /**
     * 查询工业污染源列表
     * 
     * @param basPollutionsource 工业污染源
     * @return 工业污染源
     */
    @Override
    public List<BasPollutionsource> selectBasPollutionsourceList(BasPollutionsource basPollutionsource)
    {
        return basPollutionsourceMapper.selectBasPollutionsourceList(basPollutionsource);
    }

    @Override
    public List<Map> treelist() {
        return basPollutionsourceMapper.treelist();
    }

    /**
     * 新增工业污染源
     * 
     * @param basPollutionsource 工业污染源
     * @return 结果
     */
    @Override
    public int insertBasPollutionsource(BasPollutionsource basPollutionsource)
    {
        basPollutionsource.setId(UUID.randomUUID().toString());
        return basPollutionsourceMapper.insertBasPollutionsource(basPollutionsource);
    }

    /**
     * 修改工业污染源
     * 
     * @param basPollutionsource 工业污染源
     * @return 结果
     */
    @Override
    public int updateBasPollutionsource(BasPollutionsource basPollutionsource)
    {
        return basPollutionsourceMapper.updateBasPollutionsource(basPollutionsource);
    }

    /**
     * 批量删除工业污染源
     * 
     * @param ids 需要删除的工业污染源主键
     * @return 结果
     */
    @Override
    public int deleteBasPollutionsourceByIds(String[] ids)
    {
        return basPollutionsourceMapper.deleteBasPollutionsourceByIds(ids);
    }

    /**
     * 删除工业污染源信息
     * 
     * @param id 工业污染源主键
     * @return 结果
     */
    @Override
    public int deleteBasPollutionsourceById(String id)
    {
        return basPollutionsourceMapper.deleteBasPollutionsourceById(id);
    }

    @Override
    public List<BusWaterIndustry> selectBusWaterIndustryList(BusWaterIndustry busWaterIndustry) {

        return basPollutionsourceMapper.selectBusWaterIndustryList(busWaterIndustry);
    }
}
